『Haskell Bookcamp』
https://gyazo.com/03757191fa289b2f52a8f46a0341e2b3
2024/1/30
作りながら学ぶ系の本かなmrsekut.icon
☑1 INTRODUCTION ▾
1.1 What is Haskell?
1.1.1 Abstraction and theory
1.1.2 A safe place
1.2 The pure functional way
1.2.1 A declarative recipe
1.2.2 From cake to program
1.2.3 It's all for simplicity
1.3 Usage of abstraction
1.3.1 The good parts
1.3.2 The bad parts
1.4 The things we learn
1.5 Summary
☑ 2 ANCIENT SECRET KEEPING ON MODERN MACHINES
2.1 A primer on Haskell
2.1.1 The Caesar's cipher
2.1.2 A new project
2.1.3 The first module
2.2 Typical types and fantastic functions
2.2.1 Types on the atomic level
2.2.2 Lists and tuples
2.2.3 Function types
2.2.4 Adding types to math
2.3 Little help with the alphabet
2.3.1 Synonymous types for readability
2.3.2 The kinds of letters
2.3.3 Logical combinations
2.4 Rotating the wheel
2.4.1 Finding an element's index
2.4.2 Finding the element at an index
2.4.3 Guarding control flow
2.5 Transforming a string
2.5.1 A higher-order mapping
2.5.2 Parameterizing types
2.5.3 A finished cipher
2.6 Summary
☑ 3 EVERY LINE COUNTS ▾
3.1 Talking to the outside
3.1.1 Simple actions for input and output
3.1.2 Simulating a loop
3.1.3 Breaking out of a recursive action
3.2 Pure functions inside of actions
3.2.1 Reading and modifying user input
3.2.2 Data flow between pure and impure code
3.3 Reading from the environment
3.3.1 Parsing command-line arguments
3.3.2 Encoding errors with Maybe
3.4 Example: Reading and printing a command-line argument
3.4.1 The let keyword
3.4.2 Running the program with stack
3.5 Summary
4 LINE NUMBERING TOOL ▾
4.1 Reading files and transforming their content
4.1.1 Writing a pure library
4.1.2 Hiding auxiliary arguments
4.2 Parametrized behavior in higher-order functions
4.2.1 Partial function application
4.3 Algebraic data structures as an encoding of possibilities
4.3.1 Sum types or tagged unions
4.3.2 Don't repeat yourself
4.3.3 The zip function
4.3.4 Working with missing values
4.3.5 Printing a list of values with mapM
4.4 From library to executable
4.4.1 Encoding and parsing command line options
4.4.2 An overview of the project
4.5 Summary
5 WORDS AND GRAPHS ▾
5.1 Building a graph
5.1.1 Polymorphic types
5.1.2 Introducing a new module
5.1.3 The Eq type class and type constraints
5.1.4 The flip function
5.2 Encapsulating implementations
5.2.1 Adding and removing entries
5.2.2 Using export lists to hide constructors
5.2.3 The Show type class
5.3 Using and reusing code
5.3.1 Qualified imports
5.3.2 Building maps for permutations
5.3.3 Creating a permutation map from a dictionary
5.4 Parameterizing transformations
5.4.1 List comprehensions
5.5 Summary
6 SOLVING THE LADDER GAME ▼
6.1 Constructing a breadth-first search
6.1.1 Overview of the algorithm
6.1.2 Keeping track of search state
6.1.3 Finding the solution by backtracking
6.2 Type variable scoping
6.2.1 Universal quantification
6.2.2 Language extensions
6.2.3 Using lexically scoped type variables
6.3 Improving performance with hashmaps
6.3.1 Analyzing performance with profiling
6.3.2 Adding project dependencies
6.3.3 Lazy evaluation
6.4 Summary
☑ 7 WORKING WITH CSV FILES ▼
7.1 Modeling CSV data
7.1.1 Record syntax
7.1.2 Encoding errors with Either
7.2 Smart constructors
7.2.1 Ensuring a property at time of construction
7.2.2 Providing an unsafe alternative
7.2.3 The dollar sign operator
7.3 Using type classes
7.3.1 Semigroup and Monoid
7.3.2 The IsString type class
7.4 Creating a new type class
7.4.1 A type class for slicing data structures
7.4.2 Re-exporting modules
7.5 Summary
8 A TOOL FOR CSV
8.1 Parsing data
8.1.1 Parsing numeric values
8.2 Folding data structures
8.2.1 The concept of folding
8.2.2 A structure for parsing
8.2.3 The Functor type class
8.2.4 Using folding for parsing
8.3 Printing a CSV
8.3.1 Operations on CSVS
8.4 Simple command line parser
8.4.1 Supporting flags and complicated arguments
8.5 Summary
☑9 QUICK CHECKS & RANDOM TESTS ▼
9.1 How to test
9.1.1 Property testing
9.1.2 Generating random values
9.1.3 Random and Uniform
9.1.4 Using a global random value generator
9.1.5 A basic property test
9.1.6 Defining postconditions for random values
9.2 Randomized testing
9.2.1 The benefit of referential transparency
9.3.1 Using Property in QuickCheck
9.4 Generating random values for testing
9.4.1 The random generator Gen
9.4.2 Example: AssocMap
9.4.3 Shrinking test cases
9.5 Practical usage of property testing
9.5.1 Verbosity and coverage reports
9.5.2 Modifying a tests parameters
9.5.3 Constructing test suites
9.5.4 The effectiveness of testing
9.6 Summary
✓ 10 DIGITAL MUSIC BOX ▼
10.1 Modelling Sound with Numbers
10.1.1 The zoo of numeric type classes
10.1.2 Creating periodic functions
10.2 Using infinite lists
10.2.1 Attack, decay, sustain and release
10.2.2 Building and working with infinite lists
10.3 Controlling synthesis
10.3.1 Partial field selectors
10.3.2 A function as a type
10.4 Note models
10.4.1 A type class for pitches
10.4.2 The Ratio type
10.4.3 Different kinds of exponentiation
AILABLE 105 Summary
11 PROGRAMMING MUSICAL COMPOSITIONS
11.1 Heterogenous Data Structures
11.1.1 Existential quantification
11.1.2 Using existentially quantified types
11.2 Interpreting structures
11.2.1 Mixing signals
11.2.2 Groups of polyphony
11.3 Implementing a domain specific language
11.3.1 Simplifying syntax
11.3.2 Custom operators for list like data structures
11.3.3 Fixity declarations
11.3.4 Conclusion
11.4 Summary
12 PARSING PIXEL DATA ▾
12.1 Writing a parser
12.1.1 Portable images from the past
12.1.2 How to parse a file
12.1.3 Composing effects
12.1.4 Choosing alternatively
12.1.5 Introducing monads
12.1.6 A discussion on monads
12.1.7 How to fail
12.2 Parsing on a bigger scale
12.2.1 An introduction to Attoparsec
12.2.2 Parsing images
12.2.3 Choosing between formats
12.2.4 Putting parsers together
12.3 Summary
13 PARALLEL IMAGE PROCESSING
13.1 Providing type information to the caller
13.1.1 Problems with return-type polymorphism
13.1.2 Generalized Algebraic Data Types
13.1.3 The Vector type
13.1.4 Dynamic types with existential quantification
13.2 Validation of parsed data
13.3 A generic algorithm for image conversion
13.3.1 Image kernels
13.3.2 Exporting images as PNG
13.4 Using parallelism for transforming data
13.4.1 Measuring time
13.4.2 How parallelism works
13.4.3 All about sparks
13.5 Summary
14 FILE SYNCHRONIZER
14.1 Opening and reading files
14.1.1 System.IO and Handle
14.1.2 Buffering and Seeking
14.1.3 Reading Bytes From a File
14.1.4 Resource Acquisition and bracket
14.2 Working with the file system and exceptions
14.2.2 Listing files and directories
14.2.3 The Basics of Exceptions
14.2.4 Throwing and catching exceptions
14.2.5 Handling an error
14.3 Monad Transformers
14.3.1 Reading an environment (ReaderT)
14.3.2 StateT and WriterT
14.3.3 Stacking multiple transformers (RWST)
14.3.4 Implementing an application
14.4 Providing a CLI
14.4.1 Parsing arguments with optparse-applicative
14.4.2 Enumerating custom types
14.4.3 A CLI for App
14.5 Summary
15 IFTTT MICROSERVICE